/*
 * Symtable.h
 *
 *  Created on: 08.10.2010
 *      Author: Marcel Wenzel
 */

#ifndef SYMTABLE_H_
#define SYMTABLE_H_

#include "Token.h"
#include "SymtableEntry.h"

class Symtable {
	SymtableEntry** hashtable;
	int size;
	int hash(Token* entry);
	void setToNextFreeCell(int key, Token* entry);
	SymtableEntry* isAlreadyInsertOrGetLastPos(int key, SymtableEntry* entry);
	int getDecimalAsciiValue(const char &sign);
public:
	Symtable(int size);
	Symtable();
	virtual ~Symtable();
	int insert(Token* entry);
};

#endif /* SYMTABLE_H_ */
